﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" 
    Inherits="System.Web.Mvc.ViewPage<IEnumerable<EGym.Models.Aluno>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Alunos
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
    <table>
       <tr>
           <td><%= Html.ActionLink("Alunos", "Index", "Aluno")%></td>
       </tr>       
    </table>
    </div>

    <h2>Alunos</h2>

    <table>
        <tr>            
            <th>Id</th>
            <th>Nome</th>
            <th>Nascimento</th>
            <th>Data do cadastro</th>            
            <th>Email</th>
            <th>TwitterAccount</th>
            <th></th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td><%= Html.Encode(item.AlunoId) %></td>
            <td><%= Html.Encode(item.Nome) %></td>
            <td><%= Html.Encode(item.DataNascimento) %></td>
            <td><%= Html.Encode(item.DataCadastro) %></td>            
            <td><%= Html.Encode(item.Email) %></td>
            <td><%= Html.Encode(item.TwitterAccount) %></td>
            <td>
                <%= Html.ActionLink("Editar", "Edit", new { id=item.AlunoId }) %> |
                <%= Html.ActionLink("Detalhes", "Details", new { id=item.AlunoId })%> |
                <%= Html.ActionLink("Excluir", "Delete", new { id=item.AlunoId })%>
            </td>
        </tr>
        
    <% } %>

    </table>
    
    <p>
        <%= Html.ActionLink("Novo aluno", "Create") %>
    </p>

</asp:Content>

